import request from "@/utils/request.js";

const baseUrl = '/admin/customer'

export const customerGetListService = (page, size, key) => {
    return request({
        url: `${baseUrl}/${page}/${size}`,
        method: 'GET',
        params: {key}
    })
}

export const getCustomerCountService = () => {
    return request({
        url: `${baseUrl}/count`,
        method: 'GET'
    })
}
export const customerBatchRemove = (ids) => {
    return request({
        url: `${baseUrl}`,
        method: 'DELETE',
        data: ids
    })
}

export const customerUpdateStatusService = (id, isEnabled) => {
    return request({
        url: `${baseUrl}/${id}/${isEnabled}`,
        method: 'PUT'
    })
}

export const customerExportService = (ids) => {
    return request({
        url: `${baseUrl}/export`,
        method: 'POST',
        data: ids
    })
}
